#include "stm32f1xx_hal.h"
#include "stm32f103xb.h"

typedef enum {
  ADC_BAT_V,
  ADC_CH1,
  ADC_VREFINT,
  ADC_MAX
} AdcValueDef;

#define BAT_V_MAGNIFICATION 11
#define ADC_CALI (float)(1200/get_vrefint_vol())
extern uint16_t adc_value[ADC_MAX];

uint16_t get_bat_vol(void);
uint16_t get_vrefint_vol(void);